home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -in_the_mag- / workbench / adf / uae-app / install < prev    next >
Text File  |  2000-03-05  |  4KB  |  134 lines

  1. ; UAE-App installer shit (c) 1999 by Hippie2000
  2.  
  3. (set @default-dest "")
  4.  
  5. (if (= (exists "ADF:" (noreq)) 0) (
  6.         (abort
  7.                  "Volume \"ADF:\" not found.\n\n"
  8.                  "You must have mounted the volume \"ADF:\" before you run installation!\n"
  9.                  "ADF: must be a native filesystem mounted directory, not a disk image!\n"
  10.                  "Quit UAE, mount \"ADF:\" using the UAE-GUI and run this script again!\n"
  11.         )
  12. ))
  13.  
  14. (set #hostpath
  15.         (askstring
  16.                 (prompt "HOST-PATH variable:\n\n"
  17.                         "Specify the path in your host filesystem\n"
  18.                         "which you have mounted as volume \"ADF:\"\n\n"
  19.                         "MUST END WITH A DELIMITER!\n\n"
  20.                         "Example:    D:\\amiga\\adf\\")
  21.                 (help @askstring-help)
  22.                 (default (getenv "ENV:UAE-App/HOST-PATH") )
  23.         )
  24. )
  25. (if (= #hostpath "") (
  26.         (abort
  27.                  "You did not specify HOST-PATH!\n\n"
  28.                  "Run the script again and try to be more precise!\n"
  29.         )
  30. ))
  31.  
  32. (set #hostslash
  33.         (askstring
  34.                 (prompt "HOST-SLASH variable:\n\n"
  35.                         "Specify the slash character your host filesystem uses\n"
  36.                         "to divide directorynames from filenames within pathes.\n\n"
  37.                         "MUST BE A SINGLE CHARACTER!\n\n"
  38.                         "Example:    \\")
  39.                 (help @askstring-help)
  40.                 (default (getenv "ENV:UAE-App/HOST-SLASH") )
  41.         )
  42. )
  43. (if (= #hostslash "") (
  44.         (abort
  45.                  "You did not specify HOST-SLASH!\n\n"
  46.                  "Run the script again and try to be more precise!\n"
  47.         )
  48. ))
  49. (if (<> (strlen #hostslash) 1) (
  50.         (abort
  51.                  "HOST-SLASH can not be more than one character!\n\n"
  52.                  "Run the script again and try to be more precise!\n"
  53.         )
  54. ))
  55.  
  56.  
  57. (if (<> (exists "ENV:UAE-App/BIN-PATH" (noreq)) 0) (
  58.         (set #binpath (getenv "ENV:UAE-App/BIN-PATH") )
  59. ) (
  60.         (set #binpath "C:" )
  61. ))
  62. (if (<> (exists "C:UA" (noreq)) 0) (
  63.         (set #quitapp "C:UA quitapp" )
  64. ) (
  65.         (set #quitapp "Sys:WBStartup/UAE-App quitapp" )
  66. ))
  67. (run #quitapp
  68.         (prompt "I will now shut down your old UAE-App server!\n(if it is running)")
  69.         (help "No help for this function")
  70.         (confirm)
  71. )
  72. (delete "Sys:WBStartup/UAE-App" (infos))
  73.  
  74.  
  75.  
  76. (if (<> (exists "3rdparty" (noreq)) 0) (
  77.          (copyfiles
  78.                   (prompt "I will now install UAE-App\nand all 3rdparty executables")
  79.                   (help @copyfiles-help)
  80.                   (source "")
  81.                   (dest #binpath)
  82.                   (choices "bin/ua" "docs/uae-app.guide" "docs/uae-app.readme" "3rdparty/gzip" "3rdparty/unzip" "3rdparty/xdms")
  83.                   (confirm)
  84.          )
  85.          (copylib
  86.                   (prompt "I will now install \"ixemul.library\" to Libs:")
  87.                   (help @copylib-help)
  88.                   (source "3rdparty/ixemul.library")
  89.                   (dest "libs:")
  90.                   (confirm)
  91.          )
  92. ) (
  93.          (copyfiles
  94.                   (prompt "I will now install UAE-App")
  95.                   (help @copyfiles-help)
  96.                   (source "")
  97.                   (dest #binpath)
  98.                   (choices "bin/ua" "docs/uae-app.guide" "docs/uae-app.readme")
  99.                   (confirm)
  100.          )
  101. ))
  102.  
  103.  
  104.  
  105. (if (= @user-level 2) (
  106.         (message   "I will now create the environment variables")
  107. ))
  108.  
  109. (set #amigapath "ADF:")
  110.  
  111. (makedir   "Envarc:UAE-App")
  112. (copyfiles (source "icons")    (dest "Envarc:UAE-App") (all) )
  113. (textfile  (append #hostpath)  (dest "Envarc:UAE-App/HOST-PATH") )
  114. (textfile  (append #hostslash) (dest "Envarc:UAE-App/HOST-SLASH") )
  115. (textfile  (append #amigapath) (dest "Envarc:UAE-App/AMIGA-PATH") )
  116. (textfile  (append #binpath)   (dest "Envarc:UAE-App/BIN-PATH") )
  117.  
  118. (makedir   "Env:UAE-App")
  119. (copyfiles (source "Envarc:UAE-App") (dest "Env:UAE-App") (all) )
  120.  
  121.  
  122. (startup "UAE-App"
  123.          (prompt "I will now modify \"S:User-Startup\",\nUAE-App will be launched from there in future.")
  124.          (help "No help for this function")
  125.          (command "c:run <NIL: >NIL: C:ua startup\n")
  126. )
  127.  
  128. (run "c:run <NIL: >NIL: C:ua startup"
  129.         (prompt "I will now run the UAE-App server!")
  130.         (help "No help for this function")
  131.         (confirm)
  132. )
  133.  
  134.